package com.stylefeng.guns.modular.system.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;

/**
 * <p>
 * 客户关联表
 * </p>
 *
 * @author yinjc123
 * @since 2018-04-14
 */
@TableName("crm_customer_relation")
public class CustomerRelation extends Model<CustomerRelation> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "main_customer_id",type = IdType.INPUT)
    private Integer mainCustomerId;


    @TableField("sub_customer_id")
    private Integer subCustomerId;


    public Integer getMainCustomerId() {
        return mainCustomerId;
    }

    public void setMainCustomerId(Integer mainCustomerId) {
        this.mainCustomerId = mainCustomerId;
    }

    public Integer getSubCustomerId() {
        return subCustomerId;
    }

    public void setSubCustomerId(Integer subCustomerId) {
        this.subCustomerId = subCustomerId;
    }

    @Override
    protected Serializable pkVal() {
        return this.mainCustomerId;
    }

    @Override
    public String toString() {
        return "CustomerRelation{" +
        "mainCustomerId=" + mainCustomerId +
        ", subCustomerId=" + subCustomerId +
        "}";
    }
}
